package cn.iune.erp.customer;

import java.math.BigDecimal;
import java.sql.Date;
import java.text.ParseException;
import java.util.List;

import com.alibaba.fastjson.JSONObject;

import cn.iune.common.base.IBizDataIface;

public interface IFileCustomerService extends IBizDataIface {

	void insert(FileCustomer obj);
	
	public void delete(String fID);

	public void update(FileCustomer obj) ;

	List<FileCustomer> getAll();

	FileCustomer getByID(String fID);


	//更新初次交易时间
	int updateDealDateFirst(FileCustomer fc, Date dealDate);

	//更新最近交易时间
	int updateDealDateLast(FileCustomer fc, Date dealDate);

	void beforeInsert(FileCustomer obj);

	void afterInsert(FileCustomer obj);

	void beforeDelete(String fID);

	FileCustomer getByNo(String customerNo, String enterpriseNo);

//	List<FileCustomer> getByNo(String customerNo, String enterpriseNo);

	int updateMemberPoints(FileCustomer fc, BigDecimal memberPoints);

	int updateMemberPoints(String fID, BigDecimal memberPoints);

	JSONObject queryUNION(JSONObject data) ;

	FileCustomer creatNonmember(String cUsercode, String cUsername, String userId, String enterpriseNo,
			String enterpriseName);

	FileCustomer packing(String billType, String billTypeName, String systemCode, String autoCode, String billNo,
			String cUsercode, String cUsername, String userId, String enterpriseNo, String enterpriseName);


	JSONObject save(JSONObject object) throws ParseException;

	JSONObject saveDetail(JSONObject object) throws ParseException;

	JSONObject newDataDetail(JSONObject param);

	JSONObject queryDataDetail(JSONObject param);

	FileCustomer getByMobilePhone(String sMobilePhone, String enterpriseNo);

	FileCustomer getByOgnID(String ognID, String enterpriseNo);

	FileCustomer getByLoginName(String sLoginName, String enterpriseNo);

	FileCustomer getByMemberNo(String memberNo, String enterpriseNo);

	FileCustomer getByMobilePhone(String sMobilePhone, int isMember, String enterpriseNo);

	FileCustomer creatAutomember(String sLoginName, String sMobilePhone, String personID, String personCode,
			String personName, String cUsercode, String cUsername, String userId, String enterpriseNo,
			String enterpriseName);

	FileCustomer getTempGuestInfo();

	List<FileCustomer> getList(String enterpriseNo);

	FileCustomer updateMemberAmount(String fID, BigDecimal memberAmount);

	JSONObject getMemberAmount(String fID);




}